package org.raymond.iworks.study.basic.designpattern.decorator;

/**
 * @author raymond
 * @version V1.0
 * @Description: TODO
 */
public class Decorator extends Drink{
    private Drink drink;
    public Decorator(Drink drink){
        this.drink = drink;
    }
    @Override
    public float cost() {
        return super.getPrice()+drink.cost();
    }

    @Override
    public String getDes() {
        return des
                +" "
                +price
                +" && "
                +drink.getDes();
    }
}
